<html>

<head>
<meta name='layout' content='main' />
<title><g:message code='spring.security.ui.register.title' /></title>
</head>

<body>

	<p />
	<center>
		<s2ui:form width='650' height='300' elementId='loginFormContainer'
			titleCode='spring.security.ui.register.description' center='true'>

			<g:form action='register' name='registerForm'>

				<g:if test='${emailSent}'>
					<br />
					<g:message code='spring.security.ui.register.sent' />
				</g:if>
				<g:else>

					<br />

					<table>
						<tbody>

							<s2ui:textFieldRow name='username'
								labelCode='user.username.label' bean="${command}" size='40'
								labelCodeDefault='Correo (Sin @uabc.edu.mx)'
								value="${command.username}" />

							<s2ui:textFieldRow name='nombre' labelCode='user.nombre.label'
								bean="${command}" size='40' labelCodeDefault='Nombre'
								value="${command.nombre}" />

							<s2ui:textFieldRow name='apellidos'
								labelCode='user.apellidos.label' bean="${command}" size='40'
								labelCodeDefault='Apellidos' value="${command.apellidos}" />

							<s2ui:passwordFieldRow name='password'
								labelCode='user.password.label' bean="${command}" size='40'
								labelCodeDefault='Password' value="${command.password}" />

							<s2ui:passwordFieldRow name='password2'
								labelCode='user.password2.label' bean="${command}" size='40'
								labelCodeDefault='Password (de nuevo)'
								value="${command.password2}" />

						</tbody>
					</table>

					<s2ui:submitButton elementId='create' form='registerForm'
						messageCode='spring.security.ui.register.submit' />

				</g:else>

			</g:form>

		</s2ui:form>
	</center>
	<script>
$(document).ready(function() {
	$('#username').focus();
});
</script>

</body>
</html>
